<?php
// +----------------------------------------------------------------------
// | Yzncms [ 御宅男工作室 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://yzncms.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 御宅男 <530765310@qq.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 登录验证
// +----------------------------------------------------------------------
namespace app\app\validate;

use think\Validate;

class Intention extends Validate
{

    //定义验证规则
    protected $rule = [
        'name|用户名' => 'require',
        'phone|电话'  => 'require',
        'province|省' => 'require',
        'city|市'  => 'require',
        'area|区' => 'require',
        'address|详细地址'  => 'require',
    ];

    // 登录验证场景定义
//    public function sceneUpdate()
//    {
//        return $this->only(['username', 'password', 'email', 'mobile', 'roleid'])
//            ->remove('password', 'require');
//    }

    //定义验证场景
    protected $scene = [
        'insert' => ['name', 'phone', 'province', 'city', 'area','address'],

    ];

}
